﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="book_add.aspx.cs" Inherits="BS.Web.admin.book_add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="style/main.css" />
    <style type="text/css">
        .top{height:30px;line-height:30px;padding-left:7px;border-bottom:solid 1px #AAA;position:fixed;top:0px;left:0px;right:0px;white-space:nowrap;background-color:#CCC;font:微软雅黑 宋体 arial;font-size:14px;}
        .book table{font:微软雅黑 宋体 arial;font-size:14px;margin-top:35px;}
        .book tr{height:30px;}
        .class-add table{font:微软雅黑 宋体 arial;font-size:14px;margin:0px;}
        .class-add tr{height:30px;}
        #txtTitle{width:300px;}
    </style>
    <script type="text/javascript" src="script/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="script/swfobject.js"></script>
    <script type="text/javascript" src="script/jquery.uploadify.v2.1.4.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#trAddClass').hide();
            $('.class-add').hide();
            $('#btnAddClass').click(function () {
                $('#trAddClass').show();
                $('.class-add').show('fast', function () {
                    $('#btnAddClass').prop('disabled', 'disabled');
                });
            });
            $('#btnAddCancel').click(function () {
                $('.class-add').hide('fast', function () {
                    $('#trAddClass').hide();
                    $('#btnAddClass').prop('disabled', '');
                });
            });

            $("#fPicture").uploadify({
                'uploader': 'swf/uploadify.swf',
                'script': 'book_handler.ashx',
                'cancelImg': 'image/cancel.png',
                'folder': 'uploads',
                'auto':true
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="top">
            <asp:Button ID="Button_Add" runat="server" Text="Add" Height="26" />
            <asp:Button ID="Button3" runat="server" Text="Cancel" Height="26" />
        </div>
        <div class="book">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right">Title:</td>
                    <td><input type="text" name="txtTitle" id="txtTitle" /></td>
                </tr>
                <tr>
                    <td align="right">Author:</td>
                    <td><asp:TextBox ID="TextBox_Author" runat="server" Width="300"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="right">Class:</td>
                    <td>
                        <select name="selClass">
                            <option value="1">C</option>
                            <option>C++</option>
                            <option>C#</option>
                            <option>Javascript</option>
                        </select>
                        <input type="button" value="Add" id="btnAddClass" />
                    </td>
                </tr>
                <tr id="trAddClass">
                    <td></td>
                    <td>
                        <div class="class-add">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="right">Name:</td>
                                    <td><asp:TextBox ID="TextBox3" runat="server" Width="300"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td align="right">Description:</td>
                                    <td><textarea cols="50" rows="3" style="margin:0px;width:300px;"></textarea></td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="center">
                                        <input type="button" value="Save" />
                                        <input type="button" id="btnAddCancel" value="Cancel" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="file" name="fPicture" id="fPicture"  style="" />
                        <a href="javascript:$('#fPicture').uploadifyUpload()">上传</a>| 
                        <a href="javascript:$('#fPicture').uploadifyClearQueue()">取消上传</a>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top" style="padding-top:5px;">Description:</td>
                    <td><textarea cols="80" rows="20" style="width:600px;"></textarea></td>
                </tr>
            </table>
        </div>
        
    </div>
    </form>
</body>
</html>
